package com.example.happytime;
import androidx.fragment.app.Fragment;

import org.xutils.common.Callback;
import org.xutils.http.RequestParams;
import org.xutils.x;

/**
 * A simple {@link Fragment} subclass.
 */
public class BaseFragment extends Fragment implements Callback.CommonCallback<String> {
    public void connectNetwork(String url){
        RequestParams params=new RequestParams(url);
        x.http().get(params,this);
    }


    @Override
    public void onSuccess(String result) {

    }

    @Override
    public void onError(Throwable ex, boolean isOnCallback) {

    }

    @Override
    public void onCancelled(CancelledException cex) {

    }

    @Override
    public void onFinished() {

    }
}
